<#import "../space_macro.ftl" as space />
<#include "../header.ftl" />
        <@m.widget path="/script/script_variable" cache=false />
        <script type="text/javascript" src="${base}/script/jquery.js" charset="utf-8"></script>
		<script type="text/javascript" src="${base}/script/mlog.utils.js" charset="utf-8"></script>
		<script type="text/javascript" src="${base}/script/jquery.form.js"></script>
		
        <link rel="stylesheet" type="text/css" href="${base}/script/twittereditor/twitter.css">
		<script type="text/javascript" src="${base}/script/twittereditor/twitter.js"></script>
		
		<link rel="stylesheet" type="text/css" href="${base}/script/twittereditor/twitterinput.css">
		<script type="text/javascript" src="${base}/script/twittereditor/twitterinput.js"></script>
		
	    <script type="text/javascript">
			$(document).ready(function(){
				mlog.twitter.editor.init({
					target: $('#content')
				});
				$("#content").ctrlSubmit(function(event) {
					mlog.twitter.add();
				});
				
			mlog.twitter.load();
				$(window).scroll(function(){
					if(isUserAtBottom()){
						mlog.twitter.page = mlog.twitter.page + 1;
						mlog.twitter.load();
					}
				});
				
				function isUserAtBottom() {
  					return ((($(document).height() - $(window).height()) - $(window).scrollTop()) <= 50) ? true : false;
				}
		
				
			});
		</script>
		<@side.sidenav active="碎碎念"/>
	    <div class="g-content">
	        <div class="g-content-container">
	            <div class="g-p">
					<div class="m-crumb">
					    <ul class="f-cb">
					        <li><i>&gt;</i><a href="#">博客管理</a></li>
					        <li><i>&gt;</i><a href="#">碎碎念</a></li>
					    </ul>
					    <form id="twitter-form" action="${spaceUrl}/admin/twitter/add" method="POST">
						<textarea id="content" name="content" style="display:none;"></textarea>
					    </form>
					</div>
					
					<div class="twitterinput">
					<form id="twitter-form" action="${base}/t/add" method="POST">
						<textarea id="content" name="content" style="display:none;"></textarea>
					</form>
					
					<div class="row-fluid" style="min-height:600px;">
					<ul class="twitters" id="twitters">
					</ul>
				</div>
				</div>
					
				
	            </div>
	        </div>
	    </div>
<#include "../footer.ftl" />